#@adminLayout() #define main()

<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <!-- <div class="col-sm-12 search-collapseno" >
            <form id="config-form">
                <div class="select-list">
                    <ul>
                        <li>
                     		
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div> -->

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-success" onclick="$.operate.add()">
                <i class="fa fa-plus"></i> 新增
            </a>
            <!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()">
                <i class="fa fa-edit"></i> 修改
            </a> -->
            <!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
                <i class="fa fa-remove"></i> 删除
            </a> -->
        </div>
        <div class="col-sm-12 select-table table-bordered">
            <table id="bootstrap-table" data-mobile-responsive="true" style="table-layout: fixed;word-break:break-all;"></table>
        </div>
    </div>
</div>


<script type="text/javascript">
	var ccode='#(ccode)';
	var dotype='#(dotype)';
    var prefix ="#(ctx)/sysuserface";

    $(function() {

    	queryList();
    });
    
    function queryList()
    {
        var options = {
            url: prefix + "/list?ccode="+ccode,
            createUrl: prefix + "/add?ccode="+ccode,
            updateUrl: prefix + "/edit?id={id}&ccode="+ccode,
            removeUrl: prefix + "/remove?ccode="+ccode,
            uniqueId: "id",
            sortName: "cname",
            sortOrder: "asc",
            modalName: "照片",
            columns: [{
                checkbox: true
            },{
					title: '序号',//标题  可不加,
                    width:'60px',
					formatter: function (value, row, index) {
						return index+1;
					}
             },
                {
                    field: 'img',
                    title: '人脸',
                    width:'150px',
                    formatter: function(value, row, index) {
				    	// 图片预览（注意：如存储在本地直接获取数据库路径，如有配置context-path需要使用ctx+路径）
				    	// 如：/profile/upload/2019/08/08/3b7a839aced67397bac694d77611ce72.png
				    	return $.table.imageView("/upload/"+value,500,400);
				    }
                },
                {
                    title: '操作',
                    align: 'center',
                    width: '360px',
                    formatter: function(value, row, index) {
                        var actions = [];
                        /* actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.edit(\'' + row.lse_id + '\')"><i class="fa fa-edit"></i>编辑</a> '); */
                        actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        
                        return actions.join('');
                    }
                }],

        };
        $.table.init(options);
		
	    $("#bootstrap-table").colResizable({
			liveDrag:true,
			gripInnerHtml:"<div class='grip'></div>", 
			draggingClass:"dragging", 
            resizeMode:'overflow'
        });
    }
    
    function viewFace(id)
    {
    	
    }
    
</script>
</body>

#end